<template>
    <div>
        <div class="title">
            <van-icon @click="goBack" name="arrow-left"/>
            <span>我的订单</span>
        </div>
        <!--        <van-tabs v-model="active" title-active-color="#E82050">-->
        <!--            <van-tab title="全部" to="/orders/allorders"></van-tab>-->
        <!--            <van-tab title="待付款" to="/orders/obligation"></van-tab>-->
        <!--            <van-tab title="待发货" to="/orders/awaitshipments"></van-tab>-->
        <!--            <van-tab title="待收货" to="/orders/awaitreceiving"></van-tab>-->
        <!--            <van-tab title="评价" to="/orders/evaluate"></van-tab>-->
        <!--        </van-tabs>-->
        <div class="tab">
            <router-link class="link" to="/orders/allorders">全部</router-link>
            <router-link class="link" to="/orders/obligation">待付款</router-link>
            <router-link class="link" to="/orders/awaitshipments">待发货</router-link>
            <router-link class="link" to="/orders/awaitreceiving">待收货</router-link>
            <router-link class="link" to="/orders/evaluate">评价</router-link>
        </div>
        <router-view></router-view>
    </div>
</template>

<script>
    export default {
        name: "Orders",
        data() {
            return {

            }
        },
        methods: {
            goBack() {
                this.$router.push({name: 'user'})
            }
        }
    }
</script>

<style lang="less" scoped>
  .title {
    position: relative;
    width: 375px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    font-size: 18px;
    border-bottom: 1px solid #E8E8E8;

    .van-icon-arrow-left {
      position: absolute;
      left: 0px;
      line-height: 45px;
      margin-left: 11px;
      font-size: 18px;
    }
  }

  .tab {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding-top: 10px;
    background-color: #fff;

    .link {
      font-size: 14px;
      color: #000000;
    }
  }

  .active {
    padding-bottom: 10px;
    color: red !important;
    text-decoration: none;
    border-bottom: 1px solid red;
  }



</style>
